﻿@{;
    ViewBag.Title = "表单页面";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = request('keyValue');
    $(function () {
        initControl();
    });
    //初始化控件
    function initControl() {
        //获取表单
        if (!!keyValue) {
            $.SetForm({
                url: "../../CustomerManage/MACustomer/GetFormJson",
                param: { keyValue: keyValue },
                success: function (data) {
                    $("#form1").SetWebControls(data);
                }
            })
        }
    }
    //保存表单;
    function AcceptClick() {
        if (!$('#form1').Validform()) {
            return false;
        }
        var postData = $("#form1").GetWebControls(keyValue);
        $.SaveForm({
            url: "../../CustomerManage/MACustomer/SaveForm?keyValue=" + keyValue,
            param: postData,
            loading: "正在保存数据...",
            success: function () {
                $.currentIframe().$("#gridTable").trigger("reloadGrid");
            }
        })
    }
</script>
<div style="margin-top: 20px; margin-right: 30px;">
    <table class="form">
        <tr>
            <td class="formTitle">会员编号</td>
            <td class="formValue">
                <input id="EnCode" type="text" class="form-control" value="@ViewBag.EnCode" isvalid="yes" checkexpession="NotNull" />            </td>
        </tr>
        <tr>
            <td class="formTitle">会员名字</td>
            <td class="formValue">
                <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">手机号码</td>
            <td class="formValue">
                <input id="Mobile" type="text" class="form-control" isvalid="yes" checkexpession="MobileOrNull" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">短信条数</td>
            <td class="formValue">
                <input id="Number" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">禁止登陆</td>
            <td class="formValue">
                <input id="IsDeleted" type="checkbox"  />
            </td>
        </tr>
    </table>
</div>
